#include<iostream>
#include<algorithm>

using namespace std;

const int N=20;

int g[N],k[N];
int n,ans;

struct H{
	int a;
	double b;
}h[N]={
	{60,1.0},{64,1.5},{68,2.0},
	{72,2.3},{75,2.7},{78,3.0},
	{82,3.3},{85,3.7},{90,4.0},
};


double count(int u)
{
	for(int i=8;i>=0;i--){
		if(u>=h[i].a) 
			return h[i].b;
	}
	return 0;
}


int main()
{
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		cin>>g[i];
		ans+=g[i];
	}
	for(int i=0;i<n;i++) cin>>k[i];
	
	double sum=0;
	for(int i=0;i<n;i++) sum+=count(k[i])*g[i];
	
	printf("%.2lf",sum/ans);
	
	return 0;
}
